package com.lingnan.blog.service;

import com.lingnan.blog.entity.Tag;
import com.lingnan.blog.mapper.TagMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author HeGuanChao
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class TagsService {
    @Autowired
    private TagMapper tagMapper;

    public List<Tag> findByAll(){
        return tagMapper.selectByAll();
    }

    public Tag findById(Integer id){
        return tagMapper.selectById(id);
    }
}
